home *** CD-ROM | disk | FTP | other *** search
- //simple shader: combine color and texture sample
- //Luke Lenhart
- //(C)2004-2005 Digipen Institute of Technology
-
- //cloud sampler
- sampler2D sampTex;
-
- //shader input
- struct PS_INPUT
- {
- float4 Color : COLOR;
- float2 Tex0 : TEXCOORD0;
- };
-
- //shader code
- float4 PShader(PS_INPUT In) : COLOR
- {
- //sample textutes
- float4 texclr=tex2D(sampTex,In.Tex0);
-
- //blend with vert color
- float4 clr=texclr*In.Color;
-
- //spit out color
- return clr;
- }
-